<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>拼团管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/index.css" />
</head>
<body>
<div class="order" style="padding-top:0">
    <div class="titile">拼团列表<a href="__MODULE__/StoreMessage/Editstore/op/add/">新增拼团</a></div>
    <div class="prolist">
        <ul>
            <volist name="spellgroup" id="vo">
                <li>
                    <div class="pic"><neq name="vo.f_img" value=''><img src="{$vo.f_img}"/><else/><img src="__PUBLIC__/Wx/img/addpic.png" /></neq></div>
                    <div class="name">
                        <h2>{$vo['title']}</h2>
                        <p>{$vo['state']}</p>
                        <h3>库存：<b>{$vo['num']}</b>份</h3>
                        <if condition="$vo['state'] neq '待审'">
                            <if condition="$vo['state'] neq '通过'">
                                <div class="handle">
                                    <if condition="$vo['state'] eq '不通过'">
                                        <a href="__MODULE__/StoreMessage/Editstore/op/update/id/{$vo['id']}">编辑</a>
                                    </if>
                                    <if condition="$vo['state'] eq '结束'">
                                        <a href="__MODULE__/StoreMessage/Editstore/op/shelves/id/{$vo['id']}">上架</a>
                                    </if>
                                    <span class="del" sgid="{$vo.id}">删除</span>
                                </div>
                            </if>
                        </if>
                    </div>
                </li>
            </volist>
            <!--<li>-->
                <!--<div class="pic"><img src="__PUBLIC__/Wx/images/pic13.jpg"/></div>-->
                <!--<div class="name">-->
                    <!--<h2>恩施荷花村富硒小土豆 5斤</h2>-->
                    <!--<p>审核通过</p>-->
                    <!--<h3>库存：<b>800</b>斤</h3>-->
                <!--</div>-->
            <!--</li>-->
        </ul>
    </div>
</div>
<script type="text/javascript" src="__PUBLIC__/Wx/js/jquery-1.3.1.min.js"></script>
<script type="text/javascript">
    $('.del').click(function(){
        var dele = $(this);
        var id = dele.attr('sgid');
        $.post('<?=U("StoreMessage/Deletestore")?>',{id:id},function (data) {
            if(!data){
                dele.parents("li").remove();
            }else{
                console.log(data);
            }
        })
    });

</script>
</body>
</html>